//
//  Array.hpp
//  LLTryFightingApp
//
//  Created by jinbang.li on 2024/9/24.
//

#ifndef Array_hpp
#define Array_hpp

#include <stdio.h>
#include <iostream>
#include <stdexcept>
#ifdef __cplusplus
extern "C" {
#endif
class LLArray {
public:
     void test();
};
#ifdef __cplusplus
}
#endif

#ifdef __cplusplus
extern "C" {
#endif
class LLDynamicArray {
private:
    int *arr;//存放数组的指针
    size_t capacity;
    size_t size;
    
    void resize();
public:
    LLDynamicArray():capacity(2),size(0) {
    arr = new int[capacity];
    }
    ~LLDynamicArray() {
        delete [] arr;
    }
    void push_back(int value);
    void pop_back();
    int& operator[](size_t index);
    size_t getSize() const;
    size_t getCapacity() const;
};
#ifdef __cplusplus
}
#endif
#endif /* Array_hpp */
